<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>

		<p:fieldset legend="Create" toggleable="true" toggleSpeed="500"
			collapsed="true">

			<p:outputPanel style="text-align:center;">
				<p:panelGrid columns="3" columnClasses="label,value">

					<h:outputText value="Username/Login" />
					<h:inputText id="uname2" value="#{dtUserLazyView.email}"
						required="true" requiredMessage="e-mail is mandatory!"
						validator="#{createUserValidator.validateLogin}" />
					<h:message for="uname2" style="color:red" />

					<h:outputText value="First Name" />
					<h:inputText id="fname2" value="#{dtUserLazyView.firstname}"
						required="true" requiredMessage="First name is mandatory!" />
					<h:message for="fname2" style="color:red" />

					<h:outputText value="Last Name" />
					<h:inputText id="lname2" value="#{dtUserLazyView.lastname}"
						required="true" requiredMessage="Last name is mandatory!" />
					<h:message for="lname2" style="color:red" />

					<h:outputText value="New Password" />
					<h:inputSecret id="newPassword2"
						value="#{dtUserLazyView.newPassword}" required="true"
						requiredMessage="Please enter new password here!"
						binding="#{createUserValidator.newPassword}" />
					<h:message for="newPassword2" style="color:red" />

					<h:outputText value="Retype Password" />
					<h:inputSecret id="retypePassword2"
						value="#{dtUserLazyView.retypePassword}" required="true"
						requiredMessage="Retype new password here!"
						validator="#{createUserValidator.validatePassword}" />
					<h:message for="retypePassword2" style="color:red" />
				</p:panelGrid>

				<br />
				<p:commandButton value="Create User" update="@form"
					action="#{dtUserLazyView.createUser}" />

			</p:outputPanel>

		</p:fieldset>
	</ui:composition>
</body>
</html>